home *** CD-ROM | disk | FTP | other *** search
/ Aminet 44 / Aminet 44 (2001)(GTI - Schatztruhe)[!][Aug 2001].iso / Aminet / dev / src / ChunkyStartup2.lha / ChunkyStartup2K1 / KZoomSprite.h < prev    next >
C/C++ Source or Header  |  2001-04-06  |  3KB  |  74 lines

  1. #ifndef K_ZOOMSPRITE_H
  2. #define K_ZOOMSPRITE_H
  3. /*==========================================================*/
  4. /*====                                                  ====*/
  5. /*====                                                  ====*/
  6. /*====      KZoomSprite.h => KZoomSprite.o handler      ====*/
  7. /*====      krabob@online.fr 5/04/2001                  ====*/
  8. /*====                                                  ====*/
  9. /*====                                                  ====*/
  10. /*==========================================================*/
  11. /*
  12.     short .o containing functions to zoom 8bit
  13.     rectangle chunky source in another.
  14.  
  15.     This .h was designed for vbcc (68k) that means
  16.     the primitives use the __reg("d0") syntax to notify
  17.     what argument use what register:
  18.     This syntax is not the same for other compiler
  19.     -> just change that to fit your compiler.
  20.  
  21. */
  22.  
  23. /* Amiga-Standard Types */
  24. #include    <exec/types.h>
  25. #include    "RenderContext.h"
  26. /*==========================================================*/
  27. /*====                                                  ====*/
  28. /*====      KZoomSprite8bit68K                          ====*/
  29. /*====                                                  ====*/
  30. /*==========================================================*/
  31. extern  void    KZoomSprite8bit68K( __reg("d0") int x1,
  32.                                     __reg("d1") int y1,
  33.                                     __reg("d2") int x2,
  34.                                     __reg("d3") int y2,
  35.                                     __reg("a0") struct ScreenRenderContext *SRC,
  36.                                     __reg("a1") struct TextureContext      *TCT
  37.                                     );
  38. /*
  39.  
  40.     x1,y1
  41.       +------+
  42.       |      |
  43.       +------+
  44.            x2,y2
  45.  
  46.  This rectangle coordinates represent in PIXEL
  47.  the position of the sprite rectangle in the screen.
  48.  you can exchange x1 with x2, y1 with y2, the texture will FLIP.
  49.  
  50.  But this rectangle is CLIPPED by the rendercontext rectangle:
  51.  (the pixel out are not drawn. ) -> see RenderContext.h
  52.  
  53.  src_ClipX1,src_ClipY1
  54.            +-------------------------+
  55.            |x1,y1                    |
  56.            |  +-----+                |
  57.            |  |     |                |
  58.            |  +-----+                |
  59.            |      x1,y2              |
  60.            +-------------------------+
  61.                            src_ClipX2,src_ClipY2
  62.  
  63.  TextureContext's rectangle  ttc_U1,ttc_V1,ttc_U2,ttc_V2
  64.  stand for the corresponding rectangle ON the texture.
  65.  this last coordinates are multiplicated by 65536
  66.  (or shifted left by 16:  <<16 .Trick known as "fixed coma").
  67.  
  68.  EVERY DATA in ScreenRenderContext,TextureContext must be FILLED.
  69.  
  70. */
  71.  
  72. #endif  /* K_ZOOMSPRITE_H */
  73.  
  74.